package org.box.metadata.shell.console;

import org.box.metadata.shell.CommandHandler;
import org.box.metadata.shell.Shell;
import org.box.metadata.shell.exception.TerminatedException;
import org.box.metadata.shell.exception.ValidationException;

/**
 * Performs exit from the shell
 * 
 * @author <a href="mailto:alexander.box@gmail.com">Alexander Korobka</a>
 * 
 */
public class ExitCommandHandler implements CommandHandler<ConsoleDefaultConfiguration> {


	public void validate(ConsoleDefaultConfiguration cfg, Shell shell) throws ValidationException {
	}

	public void process(ConsoleDefaultConfiguration cfg, Shell shell) throws TerminatedException {
		shell.exit();
	}

}